package com.tedu._04mybatis.pojo;

import java.util.Date;

/**
 * Entity实体类，这种类用于表示数据库中某张表，而实例则表示该表中的一条记录
 * 因此实体类的定义通常：
 * 1.类名应当与其表示的表名一致
 * 2.属性名应当与表中的字段名一致
 * 3.属性的类型应当与字段的类型匹配
 * 命名规则还是以java的命名规则为主，驼峰命名法
 */
public class User {
    private Integer id;
    private String username;
    private String password;
    private String nickname;
    private Date created;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", created=" + created +
                '}';
    }
}
